


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0"> 
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
		<title>课工场网上书城<</title>
		<link type="text/css" rel="stylesheet" href="css/style.css" />
	</head>

<script type="text/javascript">
	function modify(bid_str,i){
		var num_str = document.getElementById("nums_" + i);	
		//window.location="modify?action=modify&bid="+bid_str+"&count="+num_str.value;
	}
	
	//计算购物车内价格信息
	function countNum(size_str){
		var size = parseFloat(size_str);
		var total_price = 0;
		for(var i = 1; i <= size; i++ ){			
			var num_str = document.getElementById("nums_" + i);
			var price = document.getElementById("price_" + i);
			var hidden_price = document.getElementById("hidden_book_total_price_" + i);
			var book_price_str = document.getElementById("hidden_" + i);
			var num = parseFloat(num_str.value);
			var book_price = parseFloat(book_price_str.value);
			price.innerHTML = num * book_price;
			hidden_price.value = num * book_price;
			total_price = total_price + num * book_price;
		}
		var hidden_total_price = document.getElementById("hidden_total_price");
		hidden_total_price.value = total_price;
		document.getElementById("total_price").innerHTML = total_price;
	}
	//从购物车中移除书籍
	function remove(bid_str){		
			
		//window.location="modify?action=remove&bid="+bid_str;
	}
</script>
<body onload="countNum(1)">

<body></body>
<div id="header" class="wrap">
	<div id="logo">课工场网上书城</div>
	<div id="navbar">
			<div class="userMenu">
			<ul>
				<li class="current"><font color="BLACK">欢迎您，<strong>毛阿敏</strong></font>&nbsp;&nbsp;&nbsp;</li>
				<li><a href="main.html">首页</a></li>
				<li><a href="orderlist.html">我的订单</a></li>
				<li><a href="shopping.html">购物车</a></li>
				
				<li><a href="ranking.html">排行榜</a></li>
				<li><a href="login.html">注销</a></li>
			</ul>
		</div>
		<form method="post" name="search" action="#">
	      类型:<select>
			<option>--请选择--</option>
			<option>言情</option>
			<option>武侠</option>
			<option>科幻</option>
		  </select>		搜索：<input class="input-text" type="text" name="keywords" /><input class="input-btn" type="submit" name="submit" value="" />
		</form>
	</div>
</div>
<div id="content" class="wrap">
	<div class="list bookList">
		<form method="post" name="shoping" action="#">
			<table>
				<tr class="title">
					<th class="view">图片预览</th>
					<th>书名</th>
					<th class="nums">数量</th>
					<th class="price">价格</th>
					<th class="nums">操作</th>
				</tr>
				
				
					<tr>
						<input type="hidden" id="hidden_bid_1" name="hidden_bid_1" value="28"/>
						<td class="thumb"><img src="images/book/book_02.gif" /></td>
						<td class="title">"痕记"</td>
						<td><input class="input-text" type="text" id="nums_1" name="nums_1" value="1"  onchange="modify(28, 1)"/></td>
						<input type="hidden" id="hidden_1" name="hidden_1" value="22.80"/>
						<td>￥<span id="price_1"></span></td>
						<input type="hidden" id="hidden_book_total_price_1" name="hidden_book_total_price_1"/>
						<td><span id="remove_1"><a href="#" onclick="remove(28)">移除</a></span></td>
					</tr>
					
				</table>
				<input type="hidden" id="count" name="count" value="2"/>
			<div class="button">
				<h4>总价：￥<span id="total_price"></span>元</h4>
				<input type="hidden" id="hidden_total_price" name="hidden_total_price"/>
				<input class="input-chart" type="submit" name="submit" value="" />
			</div>
		</form>
	</div>
</div>
</body>
	<div id="footer" class="wrap">
		课工场网上书城< &copy;版权所有
	</div>
</html>
